using FileServer.Abstractions.Models.Entities;

namespace FileServer.Abstractions;

/// <summary>
/// 文件服务
/// </summary>
public interface IFileStorage
{

    Task<List<FileResource>> GetByIds(List<string> ids);
    Task<FileResource> Get(string id);
    Task<FileResource> GetByPath(string path);
    Task<bool> SaveTemp(string path);

    Task<bool> SaveTemp(List<string> paths);

    Task<bool> Delete(string fileUrl);

    Task<bool> DeleteById(string id);
    Task<bool> Add(FileResource reSource);

    /// <summary>
    /// 查询分页列表
    /// </summary>
    /// <param name="fileName">文件名称</param>
    /// <param name="startTime">查询开始时间</param>
    /// <param name="endTime">查询结束时间</param>
    /// <param name="fileUrl">文件url</param>
    /// <param name="fileNo">文件编号</param>
    /// <param name="fileId">文件id</param>
    /// <param name="page">页码</param>
    /// <param name="size">页容量</param>
    /// <returns></returns>
    Task<(int total, List<FileResource> list)> GetPageList(string fileName, string startTime, string endTime, string fileUrl, string fileNo, string fileId, int page, int size);
}